Field of the Disclosure
The present disclosure relates generally to processing devices and, more particularly, to power gating components of processing devices.
Description of the Related Art
Components in processing devices such as central processing units (CPUs), graphics processing units (GPUs), and accelerated processing units (APUs) can conserve power by transitioning between different power management states. For example, a component can conserve power by idling when there are no instructions to be executed by the component. If the component is idle for a relatively long time, power supplied to the component may then be gated so that no current is supplied to the component, thereby reducing stand-by and leakage power consumption. For example, a processor core in a CPU can be power gated if the processor core has been idle for more than a predetermined time interval. However, power management techniques that change the power management state of a component of a processing device can consume a large amount of system resources relative to the resources conserved by the state change. For example, power gating a processor core requires flushing caches in the processor core and saving the information that defines the state of the processor core, which consumes both time and power. Power gating also exacts a performance cost to return the processor core to an active state, such as when the saved state information must be copied back into registers in the processor core.
The processing device may be designed to balance the costs and benefits of power gating a component by power gating the component after it has been idle for a fixed period of time. However, timer-based approaches have a number of drawbacks. For example, an idle processor core in a CPU may be power gated (i.e., the state of the processor core may be changed from an idle power management state to a power gated power management state) just before the processor core needs to reenter the active state, which may lead to unnecessary delays and waste of the power needed to flush the caches associated with the processor core, save the state information for the processor core, and then restore the state information to return the processor core to the active state. For another example, if the processor core is not going to be used for a relatively long time, the processor core may remain in the idle state for too long before entering the power-gated state, thereby wasting the resources that could have been conserved by entering the power-gated state earlier.